package model;

import utilities.GameResource;
import font.BitmapFont;

public class FoodInfo extends ItemInfo{
	public short m_sHealth;
	public short m_sType;

	public FoodInfo(){
		m_imgPart = new Part();
	}
	public void initDescription(){
		super.initDescription();
		m_vtDescription.addElement(m_strName);
		String str = "";
		if(m_iMoney[0] > 0)
			str += GameResource.gold + GameResource.space + m_iMoney[0];
		if(m_iMoney[1] > 0)
			str += GameResource.space + GameResource.dina + GameResource.space + m_iMoney[1];
		
		m_vtDescription.addElement(str);
		
		str = "Kinh nghiệm " + m_sExperience;
		m_vtDescription.addElement(str);
				
		str = "Giá trị dinh dưỡng "+m_sHealth;
		m_vtDescription.addElement(str);
		
		int max = -999;
		int a = m_vtDescription.size();
		for(int i = 0; i < a; i++){
			str = (String)m_vtDescription.elementAt(i);
			int length = BitmapFont.m_facedeFont.stringWidth(str);
			if(length > max)
				max = length;
		}
			
		m_iWidthInfo = max + 20;
		m_iHeightInfo = 70;
	}

}
